/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.asu.cse360.client.util;

import edu.asu.cse360.client.ui.frame.AppFrame;
import edu.asu.cse360.client.ui.frame.OrderStatusPanel;
import java.awt.CardLayout;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JPanel;

/**
 *This class displays the chef's frame
 * @author owner
 */
public class ChefConfiguration extends AppConfiguration{

    @Override
    public void configure(AppFrame frame) {
        frame.showCard("chefCard");
       addMenuBar(frame);
        if(!hasConfiguredAppFrame){
            addPanels(frame);
            hasConfiguredAppFrame = true;
        }
    }
    private ChefConfiguration(){}
     private static ChefConfiguration instance;
    public static ChefConfiguration instance(){
        if(instance == null){
            instance = new ChefConfiguration();
        }
        return instance;
    }

    protected List<JMenu> getMenus(AppFrame frame){
        List<JMenu> menus = new ArrayList<JMenu>();
        //menus.add(getSettingsMenu());
        menus.add(getHelpMenu());
        menus.add(getAdminMenu(frame));
        return menus;
    }

    private void addPanels(AppFrame frame) {
        addOrderStatus(frame);
    }

    private void addOrderStatus(AppFrame frame) {
        JPanel panel = frame.getChefOrderContainer();
        addPanel(panel, new OrderStatusPanel());
    }
}
